<%-- 
    Document   : principalShop
    Created on : 18-may-2011, 11:49:33
    Author     : Javier Ruiz Hidalgo
--%>

<%@page import="iBatis.Persistencia"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="Entidades.*"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <%@include file="headShop.jsp" %>

    </head>
    <body>
            <div id="container">
            <%@include file="cabeceraShop.jsp" %>

            <%@include file="consultaPuntos.jsp" %>
            <table border="1">
                <tr>
                    <th>Producto</th>
                    <th>Puntos</th>
                    <th>Descripci&oacute;n</th>
                    <th>Canjear</th>
                </tr>

        <%
        List <Articulo> productos = Persistencia.obtieneArticulos();
        for(Articulo p: productos){

            %>

            <tr>

                <td><%=p.getNombre() %></td>
                <td><%=p.getPuntos() %></td>
                <td><%=p.getDescripcion() %></td>

            </tr>
            <%
            }

%>

            </table>
</div>
        
        <%@include file="piePaginaShop.jsp" %>
    </body>
</html>
